package com.ptp.manage;

import io.netty.channel.Channel;
import io.netty.util.internal.StringUtil;

/** 
 * @author liningning 
 * @date 2018年12月4日 下午3:02:29 
*/
public class OnLineManage {

	
	public static Channel isOnLine(String userId,String ipAddr) {
		
		if(!StringUtil.isNullOrEmpty(userId)) {
			Channel channel = ChannelManage.channels.get(userId);
			if(channel != null) {
				return channel;
			}
		}else if(!StringUtil.isNullOrEmpty(userId)){
			Channel channel = ChannelManage.channels.get(userId);
			if(channel != null) {
				return channel;
			}
		}
		
		return null;
	}
}
